﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace TestVisioCanvas
{
    /// <summary>
    /// Interaction logic for UserControl1.xaml
    /// </summary>
    public partial class RoomWizard : UserControl
    {
        public RoomWizard()
        {
            InitializeComponent();
        }

        private void Wizard_Finish(object sender, RoutedEventArgs e)
        {
            //MessageBox.Show(
            //    String.Format("you choose: paper size = {0}; scale = {1}; room type = {2}"+
            //    "lunghezza = {3} e larghezza = {4}",
            //    _lbPaperSize.SelectedIndex, _lbScale.SelectedIndex, _lbRoomType.SelectedIndex,
            //    _TBLength,_TBWidth));

            Helpers.PageSetup setup = Helpers.PageStandards.GetPageSetup(
                (Helpers.PaperFormat)_lbPaperSize.SelectedIndex,
                (Helpers.Scale)_lbScale.SelectedIndex);

            Helpers.RoomType r = (Helpers.RoomType)_lbRoomType.SelectedIndex;
            double lenght = double.Parse(_TBLength.Text);
            double width = double.Parse(_TBWidth.Text);

            MainWindow m = new MainWindow(r, setup, lenght, width);
            m.Show();
        }
    }
}
